51 research outputs found
Formalizing Propagation of Priorities in Reo, Using Eight Colors
Reo is a language for programming of coordination protocols among concurrent processes. Central to Reo are connectors: programmable synchronization/communication mediums used by processes to exchange data. Every connector runs at a clock; at every tick, it enacts an enabled synchronization/communication among processes. Connectors may prioritize certain synchronizations/communications over others. “Passive” connectors use their priorities only at clock ticks, to decide which enabled synchronization/communication to enact. “Active” connectors, in contrast, use their priorities also between clock ticks, to influence which synchronizations/communications become enabled; they are said to “propagate their priorities”. This paper addresses the problem of formalizing propagation of priorities in Reo. Specifically, this paper presents a new instantiation of the connector coloring framework, using eight colors. The resulting formalization of propagation of priorities is evaluated by proving several desirable behavioral equalities.</p
Modularizing and Specifying Protocols among Threads
We identify three problems with current techniques for implementing protocols
among threads, which complicate and impair the scalability of multicore
software development: implementing synchronization, implementing coordination,
and modularizing protocols. To mend these deficiencies, we argue for the use of
domain-specific languages (DSL) based on existing models of concurrency. To
demonstrate the feasibility of this proposal, we explain how to use the model
of concurrency Reo as a high-level protocol DSL, which offers appropriate
abstractions and a natural separation of protocols and computations. We
describe a Reo-to-Java compiler and illustrate its use through examples.Comment: In Proceedings PLACES 2012, arXiv:1302.579
Toward Sequentializing Overparallelized Protocol Code
In our ongoing work, we use constraint automata to compile protocol
specifications expressed as Reo connectors into efficient executable code,
e.g., in C. We have by now studied this automata based compilation approach
rather well, and have devised effective solutions to some of its problems.
Because our approach is based on constraint automata, the approach, its
problems, and our solutions are in fact useful and relevant well beyond the
specific case of compiling Reo. In this short paper, we identify and analyze
two such rather unexpected problems.Comment: In Proceedings ICE 2014, arXiv:1410.701
Data optimizations for constraint automata
Constraint automata (CA) constitute a coordination model based on finite
automata on infinite words. Originally introduced for modeling of coordinators,
an interesting new application of CAs is implementing coordinators (i.e.,
compiling CAs into executable code). Such an approach guarantees
correctness-by-construction and can even yield code that outperforms
hand-crafted code. The extent to which these two potential advantages
materialize depends on the smartness of CA-compilers and the existence of
proofs of their correctness.
Every transition in a CA is labeled by a "data constraint" that specifies an
atomic data-flow between coordinated processes as a first-order formula. At
run-time, compiler-generated code must handle data constraints as efficiently
as possible. In this paper, we present, and prove the correctness of two
optimization techniques for CA-compilers related to handling of data
constraints: a reduction to eliminate redundant variables and a translation
from (declarative) data constraints to (imperative) data commands expressed in
a small sequential language. Through experiments, we show that these
optimization techniques can have a positive impact on performance of generated
executable code
Synthetic Behavioural Typing: Sound, Regular Multiparty Sessions via Implicit Local Types (Artifact)
Programming distributed systems is difficult. Multiparty session typing (MPST) is a method to automatically prove safety and liveness of protocol implementations relative to protocol specifications.
In the related article ("Synthetic Behavioural Typing: Sound, Regular Multiparty Sessions via Implicit Local Types", in ECOOP 2023, LIPIcs, Vol. 263, pp. 42:1-42:30), we introduce two new techniques to significantly improve the expressiveness of the MPST method: projection is based on implicit local types instead of explicit; type checking is based on the operational semantics of implicit local types instead of on the syntax. That is, the reduction relation on implicit local types is used not only "a posteriori" to prove type soundness (as usual), but also "a priori" to define the typing rules - synthetically.
Classes of protocols that can now be specified/implemented/verified for the first time using the MPST method include: recursive protocols in which different roles participate in different branches; protocols in which a receiver chooses the sender of the first communication; protocols in which multiple roles synchronously choose both the sender and the receiver of a next communication, implemented as mixed input/output processes. In the related article, we present the theory of the new techniques, as well as their future potential, and we demonstrate their present capabilities to effectively support regular expressions as global types (not possible before).
As evidence that the new techniques are implementable, we implemented them; this implementation is available in this artifact
Shared Memory Implementations of Protocol Programming Languages:Data-Race-Free
Protocol programming languages are domain-specific languages that offer higher-level abstractions for programming of synchronization and communication protocols among participants. However, most implementations of protocol programming languages on shared memory architectures use pointer passing to exchange data in communications, so programs can still run into data races. We report on our ongoing efforts toward the first shared memory implementation of a protocol programming language that guarantees freedom of data races, without excessive copying, by leveraging the programming language Rust and its type system.</p
Choreographic Programming of Isolated Transactions
Implementing distributed systems is hard; choreographic programming aims to
make it easier. In this paper, we present the design of a new choreographic
programming language that supports isolated transactions among overlapping sets
of processes. The first idea is to track for every variable which processes are
permitted to use it. The second idea is to use model checking to prove
isolation.Comment: In Proceedings PLACES 2023, arXiv:2304.0543
- …